import Mock from 'mockjs'

const coursedata = Mock.mock({
    'data|2-4' : [
        {
            'courseid|+1': 567,
            video: '../羊村视频.mp4',
            studentname: '张子枫',
            grade: '初一',
            subject: '物理',
        }
    ]
})
// 获取课程信息
Mock.mock('/getcoursedata', 'post', (config) => {
    // console.log(courseReminder  );
    // console.log('有人请求了这个接口, 我返回了一个data')
    // 通过前端携带的参数操作数据库，返回对应的数据
    return coursedata
})
// 提交学生评价
Mock.mock('/getstudentestimate', 'post', (config) => {
    // console.log(courseReminder  );
    // console.log('有人请求了这个接口, 我返回了一个data')
    return {
        message:'评价成功'
    }
})
// 提交反馈信息
Mock.mock('/getviewfeedback', 'post', (config) => {
    // console.log(courseReminder  );
    // console.log('有人请求了这个接口, 我返回了一个data')
    return {
        message:'反馈成功'
    }
})


// 我的课程-空闲时间
const freeTime = Mock.mock({
    data : [
        {
            courseTime:'上午第一节',
            monday: '',
            tuesday: '空闲',
            wednesday: '',
            thursday: '',
            friday: '空闲',
            saturday: '空闲',
            sunday: '空闲',
        },
        {
            courseTime:'上午第二节',
            monday: '',
            tuesday: '',
            wednesday: '空闲',
            thursday: '空闲',
            friday: '',
            saturday: '空闲',
            sunday: '空闲',
        },    
        {
            courseTime:'下午第一节',
            monday: '',
            tuesday: '空闲',
            wednesday: '',
            thursday: '',
            friday: '',
            saturday: '空闲',
            sunday: '空闲',
        },    
        {
            courseTime:'上午第二节',
            monday: '',
            tuesday: '空闲',
            wednesday: '',
            thursday: '',
            friday: '',
            saturday: '空闲',
            sunday: '空闲',
        },    
        {
            courseTime:'晚自习',
            monday: '',
            tuesday: '',
            wednesday: '',
            thursday: '',
            friday: '',
            saturday: '空闲',
            sunday: '空闲',
        },
    ]
})
// 返回空闲时间信息
Mock.mock('/getfreetimedata', 'post', (config) => {
    // console.log('有人请求了这个接口, 我返回了一个data')
    return freeTime
})
